force double variable type for GLib testing for i386
authorLaszlo Boszormenyi (GCS) <gcs@debian.org>
Tue, 2 Dec 2025 18:03:25 +0000 (19:03 +0100)
committerLaszlo Boszormenyi (GCS) <gcs@debian.org>
Tue, 2 Dec 2025 18:03:25 +0000 (19:03 +0100)
Forwarded: no
Last-Update: 2023-09-05

GLib double testing fail on i386 probably due to its smaller variable width.
Make sure the numbers used as 'double' type.

Gbp-Pq: Name glib_double_type_i386.patch

lib/c_glib/test/testthrifttestclient.cpp
lib/c_glib/test/testthrifttestzlibclient.cpp

index 745feb786c04493e86b361a3a672650c3410b058..0660e00c528d11660cd2b03749d4e8353ae5388e 100644 (file)
@@ -424,8 +424,8 @@ test_thrift_client (void)
   assert (i64 == 12345);
   assert (error == nullptr);
 
-  assert (t_test_thrift_test_client_test_double (iface, &dbl, 5.6, &error) == TRUE);
-  assert (dbl == 5.6);
+  assert (t_test_thrift_test_client_test_double (iface, &dbl, (double)5.6, &error) == TRUE);
+  assert (dbl == (double)5.6);
   assert (error == nullptr);
 
   xtruct_out = (TTestXtruct *) g_object_new (T_TEST_TYPE_XTRUCT, nullptr);
index 783d06550a2967b89cb74bc7f9b36b8e80a02c06..b7629ae225c44039df2acd8c2b5c250cd71d9b2d 100644 (file)
@@ -424,8 +424,8 @@ test_thrift_client (void)
   assert (i64 == 12345);
   assert (error == nullptr);
 
-  assert (t_test_thrift_test_client_test_double (iface, &dbl, 5.6, &error) == TRUE);
-  assert (dbl == 5.6);
+  assert (t_test_thrift_test_client_test_double (iface, &dbl, (double)5.6, &error) == TRUE);
+  assert (dbl == (double)5.6);
   assert (error == nullptr);
 
   xtruct_out = (TTestXtruct *) g_object_new (T_TEST_TYPE_XTRUCT, nullptr);